package com.dragonwu.stock.controller;

import com.dragonwu.stock.feign.StockFeignService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author DragonWu
 * @date 2022-09-29 18:00
 **/
@RestController
@RequestMapping("/feignTest")
public class FeignTestController {

    @Autowired
    private StockFeignService stockFeignService;

    @GetMapping("/test01/{s}")
    public String test01(@PathVariable String s){
        try {
            return stockFeignService.test01(s);
        } catch (Exception e) {
            e.printStackTrace();
            return null;
        }
    }
}
